package com.fla.aiba.entity.live;

import com.alibaba.fastjson.annotation.JSONField;
import com.fla.aiba.entity.Entitys;
import com.fla.aiba.entity.user.User;
import org.springframework.beans.factory.annotation.Autowired;

import javax.persistence.*;
import java.util.Date;
import java.io.Serializable;

/** 
主播
 */
@Entity
@Table(name = "t_live")
public class Live  extends Entitys implements Serializable {
	private static final long serialVersionUID = 1L;
		 /**
		 	主播ID
		 **/
		 @Id
		 @GeneratedValue
		 private Long  liveId ;



		 /**
		 	主播经验值
		 **/
		 @Column(columnDefinition = "INT default 0")
		 private Integer  exp ;

		/**
		 * 标题
		 */
		@Column(nullable = false,length = 10)
		 private String title;

		/**
		 * 公告
		 */
		@Column(length = 50)
		 private String  notice;

		@ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE }, optional = false)
		@JoinColumn(name = "user_id")
		 private User user;

		 @Column(nullable = false)
		 private Date  createTime ;


		public Long getLiveId() {
			return liveId;
		}

		public void setLiveId(Long liveId) {
			this.liveId = liveId;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

		public Integer getExp() {
			return exp;
		}

		public void setExp(Integer exp) {
			this.exp = exp;
		}

		public User getUser() {
			return user;
		}

		public void setUser(User user) {
			this.user = user;
		}

		public Date getCreateTime() {
			return createTime;
		}

		public void setCreateTime(Date createTime) {
			this.createTime = createTime;
		}

		public String getNotice() {
			return notice;
		}

		public void setNotice(String notice) {
			this.notice = notice;
		}
}